<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel="STYLESHEET" href="lib.css" type='text/css' />
<link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" />
<link rel='start' href='../index.html' title='Python documentation Index' />
<link rel="first" href="lib.html" title='Python library Reference' />
<link rel='contents' href='contents.html' title="Contents" />
<link rel='index' href='genindex.html' title='Index' />
<link rel='last' href='about.html' title='About this document...' />
<link rel='help' href='about.html' title='About this document...' />
<link rel="next" href="python.html" />
<link rel="prev" href="module-pdb.html" />
<link rel="parent" href="lib.html" />
<link rel="next" href="node794.html" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name='aesop' content='information' />
<title>25. The Python Profilers </title>
</head>
<body>
<div class="navigation">
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="24.2 how It Works"
  href="debugger-hooks.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="Python library Reference"
  href="lib.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="25.1 introduction to the"
  href="node794.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="debugger-hooks.html">24.2 How It Works</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="lib.html">Python Library Reference</a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node794.html">25.1 Introduction to the</a>
</div>
<hr /></div>
</div>
<!--End of Navigation Panel-->

<h1><a name="SECTION0027000000000000000000"></a><a name="profile"></a>
<br>
25. The Python Profilers 
</h1>

<p>

<p>
Copyright © 1994, by InfoSeek Corporation, all rights reserved.
<a id='l2h-5089' xml:id='l2h-5089'></a>

<p>
Written by James Roskind.<a name="tex2html188"
  href="#foot75819"><sup>25.1</sup></a>
<p>
Permission to use, copy, modify, and distribute this Python software
and its associated documentation for any purpose (subject to the
restriction in the following sentence) without fee is hereby granted,
provided that the above copyright notice appears in all copies, and
that both that copyright notice and this permission notice appear in
supporting documentation, and that the name of InfoSeek not be used in
advertising or publicity pertaining to distribution of the software
without specific, written prior permission.  This permission is
explicitly restricted to the copying and modification of the software
to remain in Python, compiled Python, or other languages (such as C)
wherein the modified or derived code is exclusively imported into a
Python module.

<p>
INFOSEEK CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL INFOSEEK CORPORATION BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

<p>
The profiler was written after only programming in Python for 3 weeks.
As a result, it is probably clumsy code, but I don't know for sure yet
'cause I'm a beginner :-).  I did work hard to make the code run fast,
so that profiling would be a reasonable thing to do.  I tried not to
repeat code fragments, but I'm sure I did some stuff in really awkward
ways at times.  Please send suggestions for improvements to:
<span class="email">jar@netscape.com</span>.  I won't promise <em>any</em> support.  ...but
I'd appreciate the feedback.

<p>
<br><hr><h4>Footnotes</h4>
<dl>
<dt><a name="foot75819">... Roskind.</a><A
 href="profile.html#tex2html188"><sup>25.1</sup></a></dt>
<dd>
  Updated and converted to <span class="LaTeX">LaTeX</span> by Guido van Rossum.
  Further updated by Armin Rigo to integrate the documentation for the new
  <tt class="module">cProfile</tt> module of Python 2.5.

</dd>
</dl>
<p><br /></p><hr class='online-navigation' />
<div class='online-navigation'>
<!--Table of Child-Links-->
<a name="CHILD_LINKS"><strong>Subsections</strong></a>

<ul class="ChildLinks">
<li><a href="node794.html">25.1 Introduction to the profilers</a>
<li><a href="profile-instant.html">25.2 Instant User's Manual</a>
<li><a href="node796.html">25.3 What Is Deterministic Profiling?</a>
<li><a href="module-profile.html">25.4 Reference Manual - <tt class="module">profile</tt> and <tt class="module">cProfile</tt></a>
<ul>
<li><a href="profile-stats.html">25.4.1 The <tt class="class">Stats</tt> Class</a>
</ul>
<li><a href="profile-limits.html">25.5 Limitations</a>
<li><a href="profile-calibration.html">25.6 Calibration</a>
<li><a href="node801.html">25.7 Extensions -- Deriving Better Profilers</a>
<li><a href="module-hotshot.html">25.8 <tt class="module">hotshot</tt> --
         High performance logging profiler</a>
<ul>
<li><a href="hotshot-objects.html">25.8.1 Profile Objects</a>
<li><a href="module-hotshot.stats.html">25.8.2 Using hotshot data</a>
<li><a href="hotshot-example.html">25.8.3 Example Usage</a>
</ul>
<li><a href="module-timeit.html">25.9 <tt class="module">timeit</tt> --
         Measure execution time of small code snippets</a>
<ul>
<li><a href="node807.html">25.9.1 Command Line Interface</a>
<li><a href="node808.html">25.9.2 Examples</a>
</ul>
<li><a href="module-trace.html">25.10 <tt class="module">trace</tt> --
         Trace or track Python statement execution</a>
<ul>
<li><a href="trace-cli.html">25.10.1 Command Line Usage</a>
<li><a href="trace-api.html">25.10.2 Programming Interface</a>
</ul></ul>
<!--End of Table of Child-Links-->
</div>

<div class="navigation">
<div class='online-navigation'>
<p></p><hr />
<table align="center" width="100%" cellpadding="0" cellspacing="2">
<tr>
<td class='online-navigation'><a rel="prev" title="24.2 how It Works"
  href="debugger-hooks.html"><img src='../icons/previous.png'
  border='0' height='32'  alt='Previous Page' width='32' /></a></td>
<td class='online-navigation'><a rel="parent" title="Python library Reference"
  href="lib.html"><img src='../icons/up.png'
  border='0' height='32'  alt='Up one Level' width='32' /></a></td>
<td class='online-navigation'><a rel="next" title="25.1 introduction to the"
  href="node794.html"><img src='../icons/next.png'
  border='0' height='32'  alt='Next Page' width='32' /></a></td>
<td align="center" width="100%">Python Library Reference</td>
<td class='online-navigation'><a rel="contents" title="Table of Contents"
  href="contents.html"><img src='../icons/contents.png'
  border='0' height='32'  alt='Contents' width='32' /></a></td>
<td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png'
  border='0' height='32'  alt='Module Index' width='32' /></a></td>
<td class='online-navigation'><a rel="index" title="Index"
  href="genindex.html"><img src='../icons/index.png'
  border='0' height='32'  alt='Index' width='32' /></a></td>
</tr></table>
<div class='online-navigation'>
<b class="navlabel">Previous:</b>
<a class="sectref" rel="prev" href="debugger-hooks.html">24.2 How It Works</a>
<b class="navlabel">Up:</b>
<a class="sectref" rel="parent" href="lib.html">Python Library Reference</a>
<b class="navlabel">Next:</b>
<a class="sectref" rel="next" href="node794.html">25.1 Introduction to the</a>
</div>
</div>
<hr />
<span class="release-info">Release 2.5.1, documentation updated on 18th April, 2007.</span>
</div>
<!--End of Navigation Panel-->
<address>
See <i><a href="about.html">About this document...</a></i> for information on suggesting changes.
</address>
</body>
</html>
